package com.dangdang.entity;

public class OrderItem {
//    id number(12) primary key ,
//    product_id number(12) references d_book(book_id),--图书的id
//    order_id number(12) references d_order(id),--订单详情对应的订单编号
//    count number(12),                 --这本书买的数量
//    amount number(12,2)
    private Integer  id;
    private Integer product_id;
    private Integer order_id;
    private Integer count;
    private Double amount;
    private Book book;

    public OrderItem() {
    }

    public OrderItem(Integer id, Integer product_id, Integer order_id, Integer count, Double amount, Book book) {
        this.id = id;
        this.product_id = product_id;
        this.order_id = order_id;
        this.count = count;
        this.amount = amount;
        this.book = book;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getProduct_id() {
        return product_id;
    }

    public void setProduct_id(Integer product_id) {
        this.product_id = product_id;
    }

    public Integer getOrder_id() {
        return order_id;
    }

    public void setOrder_id(Integer order_id) {
        this.order_id = order_id;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", product_id=" + product_id +
                ", order_id=" + order_id +
                ", count=" + count +
                ", amount=" + amount +
                ", book=" + book +
                '}';
    }
}
